<template>
  <div class='photoInfo-container'>
    <h3 class='title'>111111</h3>
    <p class='sub-title'>
      <span>发表时间:  {{item.date|dataFor}}</span>
      <span>点击次数  {{id}}次</span>
    </p>
    <hr>
    <!-- 缩略图部分 -->
    <!-- 没有接口，又要写死了 -->
      <vue-preview :slides="slide1" class='thu'></vue-preview>
    <!-- 图片内容区域 -->
    <div class="content">
      {{item.msg}} 
      {{item.msg}} 
      {{item.msg}} 
      {{item.msg}} 
      {{item.msg}} 
      {{item.msg}} 
      {{item.msg}} 
      {{item.msg}} 
      {{item.msg}} 
      {{item.msg}} 
    </div>  
    <!-- 评论子组件 -->
    <comment></comment>
  </div>
</template>
<script>
import comment from '../subcomponents/comment.vue';

export default {
  data () {
    return {
      id:this.$route.params.id,
      item:JSON.parse(localStorage.getItem('comment4'))[0],
      slide1: [
          {
            src: 'http://localhost:3000/src/images/menu6.png',
            msrc: 'http://localhost:3000/src/images/menu6 small.png',
            alt: 'picture1',
            title: 'Image Caption 1',
            w: 600,
            h: 600
          },{
            src: 'http://localhost:3000/src/images/menu2.png',
            msrc: 'http://localhost:3000/src/images/menu2 small.png',
            alt: 'picture2',
            title: 'Image Caption 1',
            w: 600,
            h: 600
          },
          {
            src: 'http://localhost:3000/src/images/menu3.png',
            msrc: 'http://localhost:3000/src/images/menu3 small.png',
            alt: 'picture2',
            title: 'Image Caption 1',
            w: 600,
            h: 600
          },
          {
            src: 'http://localhost:3000/src/images/menu4.png',
            msrc: 'http://localhost:3000/src/images/menu4 small.png',
            alt: 'picture2',
            title: 'Image Caption 1',
            w: 600,
            h: 600
          },
          {
            src: 'http://localhost:3000/src/images/menu5.png',
            msrc: 'http://localhost:3000/src/images/menu5 small.png',
            alt: 'picture2',
            title: 'Image Caption 1',
            w: 600,
            h: 600
          }
      ]
    }
  },
  methods: {
    handleClose () {
      
    }
    
  },
  components:{
    comment
  }
}
</script>
<style lang="scss" >
  .photoInfo-container {
    padding: 3px;
    .title {
      margin: 10px 0;
      font-size: 15px;
      text-align: center;
      color: #26a2ff;
    }
    .sub-title {
      display: flex;
      justify-content: space-between;
      font-size: 13px;
    }
    //真是坑啊  就因为设置了scoped属性，耽误了我两个小时，我真是醉了
    .thu { 
      height: 50px;
      img {
        float: left;
        margin: 5px;
        width: 30px;
      }
    }
    .content {
      font-size: 13px;
      line-height: 30px;
    }
  }
  
</style>
